package cn.seecoder.courselearning.po.course.test;

import cn.seecoder.courselearning.dto.course.CourseTestDTO;
import cn.seecoder.courselearning.vo.course.test.CourseTestVO;

import java.util.Date;

public class CourseTestPO {
    // 测试id
    int testId;
    // 测试开始时间
    Date startTime;
    // 测试结束时间
    Date endTime;
    // 测试所属课程id
    int courseId;

    String testName;

    int testStatus;

    public CourseTestPO() {
    }

    public CourseTestPO(int testId, Date startTime, Date endTime, int courseId, String testName, int testStatus) {
        this.testId = testId;
        this.startTime = startTime;
        this.endTime = endTime;
        this.courseId = courseId;
        this.testName = testName;
        this.testStatus = testStatus;
    }

    public int getTestId() {
        return testId;
    }

    public void setTestId(int testId) {
        this.testId = testId;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public int getCourseId() {
        return courseId;
    }

    public void setCourseId(int courseId) {
        this.courseId = courseId;
    }

    public String getTestName() {
        return testName;
    }

    public void setTestName(String testName) {
        this.testName = testName;
    }

    public int getTestStatus() {
        return testStatus;
    }

    public void setTestStatus(int testStatus) {
        this.testStatus = testStatus;
    }

    public CourseTestPO(CourseTestDTO courseTestDTO) {
        this.testId = courseTestDTO.getTestId();
        this.startTime = courseTestDTO.getStartTime();
        this.endTime = courseTestDTO.getEndTime();
        this.courseId = courseTestDTO.getCourseId();
        this.testName = courseTestDTO.getTest();
        this.testStatus = courseTestDTO.getStatus().getTestStatus();
    }

    public CourseTestPO(CourseTestVO courseTestVO) {
        this.testId = courseTestVO.getTestId();
        this.startTime =courseTestVO.getStartTime();
        this.endTime = courseTestVO.getEndTime();
        this.courseId = courseTestVO.getCourseId();
        this.testName = courseTestVO.getTestName();
        this.testStatus = courseTestVO.getTestStatus();
    }

}
